package 设计模式.util.prototype;

import java.util.Date;

/**
 * @功能
 * @创建时间 2020/5/3
 * 浅克隆
 */
public class Clint {
    public static void main(String[] args) throws CloneNotSupportedException {
        Sheep s1 = new Sheep("11",new Date(111));
        System.out.println(s1);
        s1.setSbirthday(new Date(222));
        Sheep s2 = (Sheep) s1.clone();
        System.out.println(s2);
        System.out.println(s1.getSbirthday()==s2.getSbirthday());
    }
}
